package com.maket.jbxx.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.maket.jbxx.mapper.JldwMeasurementUnitMapper;
import com.maket.jbxx.domain.JldwMeasurementUnit;
import com.maket.jbxx.service.IJldwMeasurementUnitService;

/**
 * 计量单位Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-24
 */
@Service
public class JldwMeasurementUnitServiceImpl implements IJldwMeasurementUnitService 
{
    @Autowired
    private JldwMeasurementUnitMapper jldwMeasurementUnitMapper;

    /**
     * 查询计量单位
     * 
     * @param dwCode 计量单位主键
     * @return 计量单位
     */
    @Override
    public JldwMeasurementUnit selectJldwMeasurementUnitByDwCode(String dwCode)
    {
        return jldwMeasurementUnitMapper.selectJldwMeasurementUnitByDwCode(dwCode);
    }

    /**
     * 查询计量单位列表
     * 
     * @param jldwMeasurementUnit 计量单位
     * @return 计量单位
     */
    @Override
    public List<JldwMeasurementUnit> selectJldwMeasurementUnitList(JldwMeasurementUnit jldwMeasurementUnit)
    {
        return jldwMeasurementUnitMapper.selectJldwMeasurementUnitList(jldwMeasurementUnit);
    }

    /**
     * 新增计量单位
     * 
     * @param jldwMeasurementUnit 计量单位
     * @return 结果
     */
    @Override
    public int insertJldwMeasurementUnit(JldwMeasurementUnit jldwMeasurementUnit)
    {
        return jldwMeasurementUnitMapper.insertJldwMeasurementUnit(jldwMeasurementUnit);
    }

    /**
     * 修改计量单位
     * 
     * @param jldwMeasurementUnit 计量单位
     * @return 结果
     */
    @Override
    public int updateJldwMeasurementUnit(JldwMeasurementUnit jldwMeasurementUnit)
    {
        return jldwMeasurementUnitMapper.updateJldwMeasurementUnit(jldwMeasurementUnit);
    }

    /**
     * 批量删除计量单位
     * 
     * @param dwCodes 需要删除的计量单位主键
     * @return 结果
     */
    @Override
    public int deleteJldwMeasurementUnitByDwCodes(String[] dwCodes)
    {
        return jldwMeasurementUnitMapper.deleteJldwMeasurementUnitByDwCodes(dwCodes);
    }

    /**
     * 删除计量单位信息
     * 
     * @param dwCode 计量单位主键
     * @return 结果
     */
    @Override
    public int deleteJldwMeasurementUnitByDwCode(String dwCode)
    {
        return jldwMeasurementUnitMapper.deleteJldwMeasurementUnitByDwCode(dwCode);
    }
}
